<?php $this->load->view('scenic/layout/header') ?>
<div class="widthMax ewmMax">
    <div class="topApp am-cf am-alert" data-am-alert>
        <i class="iconfont am-close">×</i>
        <a href="http://wap.zxkj918.com/wap/scenic/wap_index/wap_download">下载APP</a>
    </div>
    <div class="scanpay-product-info">
        <a href="javascript:;" class="ewm-img">
            <img src="<?php echo $this->config->show_image_url($sceneryBase->minipics); ?>">
            <div class="ewm-name flex">
                <p class="am-text-truncate flex-1"><?php echo $sceneryBase->name_hanzi; ?></p>
                <div class="ewm-man">
                    <?php echo $sceneryBase->sales_volume; ?>人已购买
                </div>
            </div>
        </a>
        <ul class="ewm-ul">
            <?php if ($sceneryBase->open_time) :?>
                <li>
                    <h4>开放时间：</h4>
                    <p class="flex-1"><?php echo $sceneryBase->open_time;?></p>
                </li>
            <?php endif;?>
            <li data-am-modal="{target:'#buy-vive'}">
                <h4>检票方式：</h4>
                <p class="flex-1">刷身份证，扫二维码入园</p>
                <!-- <a href="javascript:;" class="ewm-scenic" data-am-modal="{target: '#scenic-introduction'}">
                    景区介绍 >
                </a> -->
            </li>
        </ul>
        <div class="scanpay-tabs">
            <div class="am-tabs ewm-tabs" data-am-tabs="{noSwipe: 1}">
              <ul class="am-tabs-nav am-nav am-nav-tabs am-nav-justify ewm-tabs-nav" data-am-sticky>
                <li class="am-active">
                    <a href="#tab1"><i class="iconfont">&#xe62a;</i>扫码购票</a>
                </li>
                <li>
                    <a href="#tab2"><i class="iconfont">&#xe614;</i>预订须知</a>
                </li>
                <li>
                    <a href="#tab3"><i class="iconfont">&#xe628;</i>景区介绍</a>
                </li>
              </ul>

              <div class="am-tabs-bd">
                <div class="am-tab-panel am-fade am-in am-active" id="tab1">
                    <div class="ewm-ticket">
                        <?php foreach($goodsBase as $key=>$item): ?>
                            <h5 class="flex">
                                <p class="flex-1"><?php echo $cat_id[$key]; ?></p>
                            </h5>
                            <ul class="ticket-ul">
                            <?php foreach($item as $val): ?>
                                <li>
                                    <div class="ticket-text flex-1 buyvive-ticket" data-goods-id="<?php echo $val->goods_id;?>">
                                        <p class="ticket-alt line2-clamp"><?php echo $val->goods_name; ?></p>
                                        <div class="ket-title flex">
                                            <div class="ket-right flex-1">票类说明 ></div>
                                        </div>
                                    </div>
                                    <a href="<?php echo site_url('scenic/scanpay/booking').'?scenicId='.$val->sid.'&ticketId=', $val->goods_id; ?>" class="ket-price buy-ticket" data-goods-id="<?php echo $val->goods_id;?>" data-min="<?php echo ($val->min_number > 0) ? $val->min_number : 1 ?>" data-max="<?php echo $val->limit_sfz_number ? $val->limit_sfz_number : $val->limit_number ?>" data-name="<?php echo $val->goods_name; ?>" data-price="<?php echo $val->market_price; ?>" >
                                        <i><span>￥</span><?php echo $val->market_price; ?></i>
                                        <p>立即预订</p>
                                    </a>
                                </li>
                            <?php endforeach;?>
                            </ul>
                        <?php endforeach;?>
                    </div>
                </div>
                <div class="am-tab-panel am-fade" id="tab2">
                    <div class="know-text">
                        <p><?php echo $sceneryBase->ticket_notic; ?></p>
                    </div>
                </div>
                <div class="am-tab-panel am-fade" id="tab3">
                    <div class="vive-know">
                        <?php echo $sceneryBase->info; ?>
                    </div>
                </div>
              </div>
            </div>
        </div>
        <nav class="scrollspy-nav ewm-box-nav" data-am-sticky>
          <ul class="flex" id="nav-jjtcc">
            <li>
                <a href="#jingqu" class="am-active">景区</a>
            </li>
            <li>
                <a href="#jiudian">酒店</a>
            </li>
            <li>
                <a href="#techan">特产</a>
            </li>
            <li id="eat-li">
                <a href="#canyin" >餐饮</a>
            </li>
            <li>
                <a href="#chengshi">城市1站通</a>
            </li>
          </ul>
        </nav>
        <div class="ewm-box jingqu" id="jingqu" data-sid="<?php echo $sceneryBase->sid; ?>" data-cityid="<?php echo $sceneryBase->cityid; ?>" data-provinceid="<?php echo $sceneryBase->provinceid; ?>">
            <!-- 景区异步加载 -->
        </div>
        <div class="ewm-box jiudian" id="jiudian" data-sid="<?php echo $sceneryBase->sid; ?>" data-cityid="<?php echo $sceneryBase->cityid; ?>" data-provinceid="<?php echo $sceneryBase->provinceid; ?>">
            <!-- 酒店异步加载 -->
        </div>
        <div class="ewm-box techan" id="techan" data-sid="<?php echo $sceneryBase->sid; ?>" data-cityid="<?php echo $sceneryBase->cityid; ?>" data-cityid="<?php echo $sceneryBase->cityid; ?>" data-provinceid="<?php echo $sceneryBase->provinceid; ?>">
            <!-- 附近特产异步加载 -->
        </div>
        <div  id="canyin" class="ewm-box canyin" data-sid="<?php echo $sceneryBase->sid; ?>" >
            
        </div>
        <!-- 娱乐 -->
        <div id="chengshi" class="ewm-box chengshi" data-cityid="<?php echo $sceneryBase->cityid; ?>">
            <!-- 自助导游 城市一站通 -->
        </div>
    </div>
    <footer class="ewm-footer sec-head">
        <ul class="flex">
            <li>
                <a href="<?php echo site_url(); ?>">
                    <i class="iconfont">&#xe605;</i>
                    <span>首页</span>
                </a>
            </li>
            <li>
                <a href="<?php echo site_url('scenic/order/index'); ?>">
                    <i class="iconfont">&#xe622;</i>
                    <span>我的订单</span>
                </a>
            </li>
        </ul>
    </footer>

    <?php foreach($goodsBase as $key=>$item): ?>
        <?php foreach($item as $val): ?>
            <!-- 预订须知 -->
            <div id="buyvive-ticket-<?php echo $val->goods_id; ?>" class="vive-Alert hide-loading buy-alert am-modal" tabindex="-1"> <!-- hide-loading切换 -->
                <h4 class="alert-head flex flex-pack-justify">
                    <p class="alert-explain flex-1">预订须知</p>
                    <a href="javascript:void(0)" class="am-close alert-close" data-am-modal-close>&times;</a>
                </h4>
                <div class="explain-content-info">
                    <!-- 门票须知 -->
                    <div class="ticket-contents alert-exact">
                        <h6>包含项目</h6>
                        <p><?php echo $val->goods_containe_item ?></p>
                        <h6>入园方式</h6>
                        <p><?php echo $val->goods_park_mode ?></p>
                        <h6>退改说明</h6>
                        <p><?php echo $val->goods_refund_info; ?></p>
                    </div>
                </div>
                <div class="ticket-loading flex flex-pack-center flex-align-center">
                    <i class="iconfont am-animation-spin">&#xe60c;</i>
                </div>
            </div>
        <?php endforeach; ?>
    <?php endforeach; ?>
</div>

<?php $this->load->view('scenic/layout/footer') ?>
<?php js('scenic', 'scanpay');?>
